export default{
	formatTime(timestamp){
		// 转换时间戳为日期对象
		let date = new Date(timestamp*1000);
		let year = date.getFullYear();
		let month = date.getMonth() + 1<10?"0"+(date.getMonth() + 1):date.getMonth() + 1;
		let day = date.getDate()<10?"0"+date.getDate():date.getDate();
		let hour = date.getHours()<10?"0"+date.getHours():date.getHours();
		let min = date.getMinutes()<10?"0"+date.getMinutes():date.getMinutes();
		let sec = date.getSeconds()<10?"0"+date.getSeconds():date.getSeconds();
		// 格式化日期
		return `${year}/${month}/${day} ${hour}:${min}:${sec}`;
	}
}